
export function configForm () {
  return [
    {
      fieldName: "报送人账号",
      field: "crsrmReporterLdap",
      value: "",
      type: "input",
    },
    {
      fieldName: "报送人姓名",
      field: "crsrmReporterName",
      value: "",
      type: "input",
    },
    {
      fieldName: "采购人所属一级利润中心",
      field: "crsrmPurchaserSbu",
      value: "",
      type: "select",
      optionList: this.crsrm_purchaser_sbu
    },
    {
      fieldName: '用户类型',
      field: 'userType',
      value: '',
      type: 'select',
      optionList: this.crsrm_user_type
    },
/*    {
      fieldName: '用户类型',
      field: 'userType',
      value: '',
      type: 'select',
      optionList: this.crsrm_user_type
    },*/
    // {
    //   fieldName: '创建时间',
    //   field: 'create_time',
    //   aliasField: 'createTime',
    //   value: '',
    //   type: 'date'
    // },
    // {
    //   fieldName: '更新时间',
    //   field: 'update_time',
    //   aliasField: 'updateTime',
    //   value: '',
    //   type: 'date'
    // },

  ]
}

export function generateColumns() {
  return [
/*    {
      type: "selection",
      width: 60,
      align: "center",
      fixed: "left"
    },*/
    {
      title: "报送人账号",
      key: "crsrmReporterLdap",
      minWidth: 120
    },
    {
      title: '报送人姓名',
      key: 'crsrmReporterName',
      minWidth: 120
    },
    {
      title: '报送人邮箱',
      key: 'email',
      minWidth: 180
    },
    {
      title: '用户类型',
      key: 'userTypeStr',
      minWidth: 260
    },
    {
      title: '利润中心',
      key: 'crsrmPurchaserName',
      minWidth: 260
    },
    {
      title: '更新时间',
      key: 'updateTime',
      minWidth: 60
    },
    {
      title: '操作',
      render: (h, { row }) => {
        return h("RowTools", {
          props: {
            data: [
              {
                text: '查看',
                handle: () => this.detailMethod(row)
              },
              {
                text: '编辑',
                handle: () => this.editHandle(row)
              },
              {
                text: '删除',
                handle: () => this.deleteHandle(row)
              }
            ]
          }
        });
      }
    }
  ]
}
